import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//引入ElementUI样式
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//引入axios
// import axios from 'axios'
//引入阿里图标库样式
import './assets/js/iconfont.js'
import './assets/css/iconfont.css'
//引入全局样式
import './assets/css/reset.css'
//引入封装分页组件
import Pagination from '@/components/Pagination/index'
//引入封装下拉选组件
import MySelect from '@/components/Select/index'
//引入封装图片上传组件
import MyUploadImg from '@/components/UploadImg/index'
//引入封装excel上传组件
import MyUploadExcel from '@/components/UploadExcel/index'
//引入封装拦截器的axios
import request from "@/util/axios";
//引入qs（参数序列化）
import qs from "qs";


// Vue.prototype.axios = axios
Vue.prototype.axios = request
Vue.prototype.$qs = qs
Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.component('pagination', Pagination)
Vue.component('my-select', MySelect)
Vue.component('my-upload-img', MyUploadImg)
Vue.component("my-upload-excel", MyUploadExcel)

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')

// 生产环境禁用 console.log
if (process.env.NODE_ENV === 'production') {
  console.log = () => {}
  console.debug = () => {}
  console.info = () => {}
  // 保留 console.warn 和 console.error
}